home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_vol_randquake.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
122 lines
# Jones 3D Cog Script
#
# VOL_randquake.cog
#
# [CM]
#
# Random screenshakes for unstable areas.
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
#...............MESSAGES..............
message startup
message crossed
message pulse
message timer
#...............ACTORS..............
thing player local
#...............TRIGGERS..............
surface cuesurf0 linkID=4
surface cuesurf1 linkID=4
surface onsurf linkID=1
surface onsurf1 linkID=1
surface offsurf linkID=2
surface offsurf1 linkID=2
#...............VARIABLES..............
flex shake local
int rumblesound local
int cueplayed=0 local
int i local
#...............SOUNDS..............
sound quake=nub_bull_move1_c.wav local
sound music=mus_gen_danger2.wav local
sound sayline=VL01J02.WAV local # "...volcano's still active"
end
# ========================================================================================
code
startup:
player=GetLocalPlayerThing();
return;
# ========================================================================================
crossed:
If ((GetSenderID() == 4) && (cueplayed == 0))
{
cueplayed = 1;
PlaySoundLocal(music, 1.0, 0.0, 0x0, 0);
PlayVoice(player, sayline, 1.0, 0);
return;
}
If (GetSenderID() == 1)
{
SetPulse(6);
}
If (GetSenderID() == 2)
{
SetPulse(0);
}
return;
# ========================================================================================
pulse:
shake = Rand();
If (shake <= 0.33)
{
#print("smallslow");
rumblesound = PlaySoundLocal(quake, 8, -1, 0x01, 0);
for (i=0 ; i <= 30; i = i + 1)
{
SetPOVShake('0.0 0.0 0.001', '0.0 0.0 0.001', 80.0, 0.80);
Sleep(.05);
}
StopSound(rumblesound, 1.0);
}
If ((shake > 0.33) && (shake < .5))
{
#print("bigfast");
rumblesound = PlaySoundLocal(quake, 10, -1, 0x01, 0);
for (i=0 ; i <= 10; i = i + 1)
{
SetPOVShake('0.0 0.0 0.003', '0.0 0.0 0.003', 80.0, 0.80);
Sleep(.05);
}
StopSound(rumblesound, 1.0);
}
return;
# ========================================================================================
end